import App from './App'

// #ifndef VUE3
import store from './store';
import Vue from 'vue'
import './uni.promisify.adaptor'
Vue.config.productionTip = false
App.mpType = 'app'
const app = new Vue({
  ...App,
  store
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import store from './store';
const loginInfo = uni.getStorageSync('loginInfo');
if (loginInfo) {
  // 如果有登录信息，将其提交到 Vuex 的 mutation 中恢复登录状态
  store.commit('setLoginInfo', loginInfo);
}
export function createApp() {
  const app = createSSRApp(App)
  app.use(store);
  return {
    app
  }
}
// #endif